package manage;

import javax.faces.bean.ManagedBean;

import model.Disciplina;
import model.Professor;
import model.dao.DisciplinaDAO;
import model.dao.ProfessorDAO;

@ManagedBean
public class ProfessorBean {

	private Professor professor = new Professor();
	private Disciplina disciplina =  new Disciplina();


	
	public String incluirProfessor(){
		
		
		ProfessorDAO.getInstance().adiciona(professor);
		disciplina.setProfessor(professor);
		DisciplinaDAO.getInstance().adiciona(disciplina);
		
		return "home";
		
	}



	public Professor getProfessor() {
		return professor;
	}



	public void setprofessor(Professor professor) {
		this.professor = professor;
	}



	public Disciplina getDisciplina() {
		return disciplina;
	}



	public void setDisciplina(Disciplina disciplina) {
		this.disciplina = disciplina;
	}



	public void setProfessor(Professor professor) {
		this.professor = professor;
	}







}
